import axios from "axios";
const state = {
  car_items: [
    {src:'http://www.lynchpin.com.cn/uploadfile/2019/0118/20190118102526280.jpg'},
    {src:'http://www.lynchpin.com.cn/uploadfile/2019/0126/20190126115119666.jpg'},
    {src:'http://www.lynchpin.com.cn/uploadfile/2019/0116/20190116044605480.jpg'},
    {src:'http://www.lynchpin.com.cn/uploadfile/2019/0116/20190116044503409.jpg'}
  ],
}
const getters = {
  carItems: (state)=>state.car_items
}
const url = 'https://reqres.in/api/users'
const actions = {
  async fetchItems({commit}){

    const response = await axios({
      method: 'get',
      url: url,
      data:{
        name: 'lincaigui',
        country: 'china'
      }
    });
    console.log(response.data)
  }
}
const mutations = {}
export default {
  state,
  getters,
  actions,
  mutations
}
